package com.cy;
//继承Thread
public class Test10 {
    public static void main(String[] args) {

        for(int i = 0 ;i<10;i++){
            //new MyThread().run(); //没有多线程的效果
            new MyThread().start();
        }

    }
}

class MyThread extends Thread{
     public void run(){
         for(int i = 0;i<10;i++){
             System.out.println(super.getName()+"==="+i);
         }
     }
}
